package com.cmc.cloud.cmclink.doc.api.document.rep;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * 订舱主 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 *
 * @author codegen
 */
@Data
public class SoBaseRespDto {
    @Schema(description = "订舱号")
    @Length(max = 20, message = "订舱号支持最大长度{max}")
    private String bookingNo;

    @Schema(description = "提单号 规则")
    @Length(max = 50, message = "提单号 规则支持最大长度{max}")
    private String blNo;

    @Schema(description = "客户参考号")
    @Length(max = 50, message = "客户参考号支持最大长度{max}")
    private String referenceNo;

    @Schema(description = "订舱船名 line 第一段", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "订舱船名不能为空")
    @Length(max = 50, message = "订舱船名 line 第一段支持最大长度{max}")
    private String bookingVessel;

    @Schema(description = "订舱航次 line 第一段", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "订舱航次不能为空")
    @Length(max = 50, message = "订舱航次 line 第一段支持最大长度{max}")
    private String bookingVoyage;

    @Schema(description = "route Id", requiredMode = Schema.RequiredMode.REQUIRED, example = "18841")
    @NotNull(message = "route Id不能为空")
    private Long routeId;

    @Schema(description = "路径描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "你说的对")
    @NotBlank(message = "路径描述不能为空")
    @Length(max = 255, message = "路径描述支持最大长度{max}")
    private String routeDescription;

    @Schema(description = "第一个liner段的POL设置为current pol")
    @Length(max = 5, message = "接货地支持最大长度{max}")
    private String currentPort;

    @Schema(description = "接货地", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "接货地不能为空")
    @Length(max = 5, message = "接货地支持最大长度{max}")
    private String porCode;

    @Schema(description = "装货港", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "装货港不能为空")
    @Length(max = 5, message = "装货港支持最大长度{max}")
    private String polCode;

    @Schema(description = "卸货港", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "卸货港不能为空")
    @Length(max = 5, message = "卸货港支持最大长度{max}")
    private String podCode;

    @Schema(description = "目的地", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "目的地不能为空")
    @Length(max = 5, message = "目的地支持最大长度{max}")
    private String delCode;

    @Schema(description = "订舱人代码", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "订舱人代码不能为空")
    @Length(max = 50, message = "订舱人代码支持最大长度{max}")
    private String bookingParty;

    @Schema(description = "一级代理代码")
    @Length(max = 50, message = "一级代理代码支持最大长度{max}")
    private String topAgent;

    @Schema(description = "箱状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @NotBlank(message = "箱状态不能为空")
    @Length(max = 1, message = "箱状态支持最大长度{max}")
    private String cntrStatus;

    @Schema(description = "箱主代码", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "箱主代码不能为空")
    @Length(max = 5, message = "箱主代码支持最大长度{max}")
    private String cntrOwner;

    @Schema(description = "舱位代码", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "舱位代码不能为空")
    @Length(max = 5, message = "舱位代码支持最大长度{max}")
    private String spaceOwner;

    @Schema(description = "约号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "约号不能为空")
    @Length(max = 32, message = "约号支持最大长度{max}")
    private String agreementNo;

    @Schema(description = "运输条款", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "运输条款不能为空")
    @Length(max = 5, message = "运输条款支持最大长度{max}")
    private String shippingTerm;

    @Schema(description = "so 通知邮箱 多个")
    @Length(max = 500, message = "so 通知邮箱 多个支持最大长度{max}")
    private String soNotifyEmails;

    @Schema(description = "si 通知邮箱 多个")
    @Length(max = 500, message = "si 通知邮箱 多个支持最大长度{max}")
    private String siNotifyEmails;

    @Schema(description = "订舱状态 下拉框选项来源基础数据 SO Status 0 草稿 1 订舱处理中 2 订舱舱位确认中 3 订舱已确认 4 订舱待补充材料 5 订舱拒绝", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @NotBlank(message = "订舱状态 下拉框选项来源基础数据 SO Status 0 草稿 1 订舱处理中 2 订舱舱位确认中 3 订舱已确认 4 订舱待补充材料 5 订舱拒绝不能为空")
    @Length(max = 20, message = "订舱状态 下拉框选项来源基础数据 SO Status 0 草稿 1 订舱处理中 2 订舱舱位确认中 3 订舱已确认 4 订舱待补充材料 5 订舱拒绝支持最大长度{max}")
    private String soStatus;

    @Schema(description = "SO内容审核状态 Pending待审核 Approved审核通过 Rejected拒绝 Pending For Material Uploaded待客户补充资料", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotBlank(message = "SO内容审核状态 Pending待审核 Approved审核通过 Rejected拒绝 Pending For Material Uploaded待客户补充资料不能为空")
    @Length(max = 30, message = "SO内容审核状态 Pending待审核 Approved审核通过 Rejected拒绝 Pending For Material Uploaded待客户补充资料支持最大长度{max}")
    private String soContentStatus;

    @Schema(description = "数据来源 网厅web 、edi、api、手动manual、", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "数据来源 网厅web 、edi、api、手动manual、不能为空")
    @Length(max = 20, message = "数据来源 网厅web 、edi、api、手动manual、支持最大长度{max}")
    private String dataSource;

    @Schema(description = "拆分来源 正常 normal 拆分 split 合并 combine", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "拆分来源 正常 normal 拆分 split 合并 combine不能为空")
    @Length(max = 20, message = "拆分来源 正常 normal 拆分 split 合并 combine支持最大长度{max}")
    private String splitCombine;

    @Schema(description = "订舱时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date bookingTime;

    @Schema(description = "订舱备注", example = "你说的对")
    @Length(max = 500, message = "订舱备注支持最大长度{max}")
    private String bookingRemark;

    @Schema(description = "审批流 id", example = "22055")
    private Long processInstanceId;

    @Schema(description = "订舱号维度，0 审批通过后修改审批中 只有一个 不显示 （审批通过后，当前变为1)；1 有效  默认1 正常显示；-1 无效  旧审批通过变为-1，再审批不通过也改为-1 不显示；", example = "1")
    private Integer validStatus;

    @Schema(description = "审批通过后修改关联旧SO的ID", example = "31816")
    private Long oldId;

    @Schema(description = "特种货审核状态 改关联ID，查询其他表状态", example = "31816")
    private Long specialCargoAuditId;

    @Schema(description = "特种货审核状态 ", example = "31816")
    private String specialCargoAuditStatus;
}
